{% include "header.html"%}
<div class="container">
    <table class="table table-bordered table-striped">
      <tr>
        <th>序号</th>
        <th>时间</th>
        <th>申请人</th>
        <th>申请类型</th>
        <th>审核人</th>
        <th>任务编号</th>
        <th>申请内容</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
      {% for audit in audits %}
      <tr>
        <td>
          <div>{{audit.Id}}</div>
        </td>
        <td>
            <div>{{audit.UpdateTime}}</div>
        </td>
        <td>
            <div>{{audit.ApplyUser}}</div>
        </td>
        <td>
          <div>
            {% if audit.ApplyType == 0%} 新增订阅 {% endif %}
            {% if audit.ApplyType == 1%} 更新订阅 {% endif %}
          </div>
        </td>
        <td>
            <div>{{audit.AuditUser}}</div>
        </td>
        <td>
          <div>{{audit.TaskId}}</div>
        </td>
        <td>
          <div>
              <button type="button" class="btn btn-info btn-sm" onclick="getDialogAudit(this, {{audit.Id}})" data-toggle="modal">
                  订阅详情
              </button>
          </div>
        </td>
        <td>
            <div>
                {% if audit.State == 0%} 未处理{% endif %}
                {% if audit.State == 1%} 处理中{% endif %}
                {% if audit.State == 2%} 已同意{% endif %}
                {% if audit.State == 3%} 不同意{% endif %}
                {% if audit.State == 4%} 已启用{% endif %}
            </div>
        </td>
        <td>
          <button class="btn btn-sm btn-success" {% if audit.State != 2 %} disabled {% endif %}onclick="enableAudit({{audit.Id}})">启用任务</button>
        </td>
      </tr>
      {% endfor %}
    </table>
  </div>
{% include "footer.html" %}